import feffery_antd_components as fac

from dash import (
    dcc,
    html,
    callback,
    Output,
    Input,
    State,
    register_page,
    get_app,
)

register_page(__name__, name="产品保有规模", order=7)


def layout():
    return html.Div(
        [
            fac.AntdText("\n日期范围"),
            fac.AntdDateRangePicker(
                id="prodholding-date-range-picker",
            ),
            fac.AntdSelect(
                options=[
                    {"label": f"{i}频", "value": f"{i}频"} for i in ["日", "周", "月"]
                ],
                defaultValue="日频",
                style={"width": 70},
            ),
            fac.AntdDivider(
                ["分组汇总"],
                innerTextOrientation="left",
            ),
            fac.AntdRadioGroup(
                options=[
                    {"label": "按产品", "value": "按产品"},
                    {"label": "按分支机构", "value": "按分支机构"},
                    {"label": "按策略", "value": "按策略"},
                ],
                defaultValue="按产品",
                optionType="button",
                buttonStyle="solid",
            ),
            fac.AntdButton("查询", id="prodholding-query-button", type="primary"),
        ]
    )
